/*
 * Created on 2006-5-18
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package kerjodando.vincent;

import org.apache.log4j.Logger;
import org.apache.log4j.Level;


/**
 * @author vicent(zhu1230@gmail.com)
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class runThread extends Thread{
    /**
     * Logger for this class
     */
    private static final Logger logger = Logger.getLogger(runThread.class);

    
    public void run()
    {
        while(true)
        {
        	runThread.logger.setLevel(Level.OFF);
        	runThread.logger.info("flag => "+this.getName());
            try {
                getfile gf=new getfile();
                gf.downloadFiles();
                gf.makeTrustedpeersFile();
                Antsp2pManager am=new Antsp2pManager();
                //am.updateIpfilter();
             //  am.updateSettings();
                am.updateTrustip();
                am.checkpeers();
            } catch (Exception e1) {
                // TODO Auto-generated catch block
                runThread.logger.error("run()", e1);
                e1.printStackTrace();
            }
             try {
                 Thread.sleep(30000L);
                 //Thread.sleep(60000L);
             } catch (RuntimeException e) {
                 runThread.logger.error("run()", e);
             } catch (InterruptedException e) {
                 runThread.logger.error("run()", e);
             }
        }
    }
}
